import style from './index.module.css'
import SelectionItem from '../selection/SelectionItem'
import { SaveSelect } from '../../../myTypes'

export default function SelectList(prop: { leftSelect: Array<SaveSelect>; rightSelect: Array<SaveSelect> }) {
  const { leftSelect, rightSelect } = prop
  return (
    <>
      {/* 有数据时展示 */}
      <div className={style['select-list']}>
        <div className={style['select-items']}>
          {leftSelect.map((s, i) => {
            return <SelectionItem s={s} key={i} />
          })}
        </div>
        <div className={style['select-items']}>
          {rightSelect.map((s, i) => {
            return <SelectionItem s={s} key={i} />
          })}
        </div>
      </div>
    </>
  )
}
